package com.opencloud.tenant.server.service.impl;

import com.opencloud.common.mybatis.base.service.impl.BaseServiceImpl;
import com.opencloud.tenant.server.mapper.SysRoleMapper;
import com.opencloud.tenant.server.service.SysRoleService;
import com.opencloud.tenant.client.model.entity.SysRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysRoleServiceImpl extends BaseServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {

    @Autowired
    private SysRoleMapper sysRoleMapper;

    @Override
    public List<SysRole> getSysUserRoles(Long userId) {
        List<SysRole> roles = sysRoleMapper.selectRoleUserList(userId);
        return roles;
    }
}
